<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	margin-left: 1cm;
	margin-right: 1cm;
}
.style1 {
	font-size: 24px;
	font-weight: bold;
}
-->
</style></head>

<body>
<div align="center">
  <p class="style1">Language Editing</p>
  <p align="left"><B> Making an AMAI translation.</B><a name="MakingTranslation"></a><BR>
    As you probably noticed AMAI support several different languages already, if you know a language that is not yet supported you can easily make your own translation and make AMAI use it by following these instructions carefully.<BR>
<BR>
With this you work in the language folder, there you see some folders for all currently supported languages.<BR>
Now when you are going to add a new language just create a new folder here and copy all files from the language folder you want to translate from to your folder.<BR>
After this you just open all the '.txt' files and translate all text in it with a few exceptions.<BR>
<BR>
Commander.txt and Strategy.txt are table files and need to be opened in a table editor like Microsoft Excel (although a simple text editor will probably do the job too).<BR>
When translating these don't touch the first column since that is the link name that makes AMAI know what strategy/command it is that you are currently translating.<BR>
If you are adding a report for a new strategy you created just add the function name of your strategy in a new line at the buttom of this file and fill in the other columns for it with your translation.<BR>
<BR>
The chat files only contain different kind of taunts or messages for different situations as you might notice. Don't translate them straight over, remove them instead and come up with own taunts that fit your language better.<BR>
<BR>
The file CommanderStart.txt contains the text displayed at the start of games when played using the commander. here you can also add some credits to yourself for making this translation.<BR>
<BR>
When you are done with all files all that remains is to add your language in the language table located in the file 'Languages.txt' in the root, then you are done, your language should be selectable the next time you try out this AMAI after compiling and reinstalling it to a map.</p>
  <p align="left"><B>Making an advanced AMAI translation.</B><a name="MakingAdvancedTranslation"></a><BR>
    <BR>
    The new chat system allows you to improve your chat using conditions and variables in the chat strings. This is how it works.<BR>
<BR>
<B>Instructions for use of variables, conditions and translations in 'Translations.txt'.</B><BR>
<BR>
<B>Variables:</B> Entered anywhere in chat text with [ ].<BR>
Example: "My [Color] [Race] army will beat you puny [PlayerColor] [PlayerRace] army easily."<BR>
Result for a pink orc talking to a green human as seen if you are the green human:<BR>
"My pink orc army will beat your puny green human army easily."<BR>
<BR>
Race - The computers own race.<BR>
Color - The computer own color.<BR>
Name - The computers own name.<BR>
PlayerColor - The other players color. (If displayed to enemies all enemies will see theire own color where this variable is)<BR>
PlayerRace - The other players race. (If displayed to enemies all enemies will see theire own race where this variable is)<BR>
TargetColor - If a computer saying something while it's targeting another player(attack or megatarget) this is the targets color<BR>
TargetRace - If a computer saying something while it's targeting another player(attack or megatarget) this is the targets race<BR>
OwnGold - Computer displays it's own current gold.<BR>
OwnLumber - Computer displays it's own current lumber.<BR>
RandomRace - Will display name of a randomly picked race.<BR>
<BR>
More examples:<BR>
"I heard that [RandomRace] is really bad in this patch."<BR>
"We better attack that [TargetColor] [TargetRace], he's almost dead now."<BR>
"Can you please give me some gold, I only have [OwnGold]."<BR>
"Hi, my name is [Name], GL &amp; HF!"<BR>
<BR>
<BR>
<B>Conditions:</B> Entered before the chat string starts with { }.<BR>
One condition: "{condition}I will only show this text under this condition."<BR>
Many conditions: "{condition1,condition2,condition3}Only when all these 3 conditions are meet you will see this."<BR>
Examples:<BR>
"{Random&lt;=50}This chat line only has half the chance of other lines to be displayed"<BR>
"{OwnGold&gt;=500,OwnLumber&gt;=500}This chat line is only displayed when the computer has over 500 gold and lumber"<BR>
"{FFA}This chat line is only displayed if the game is FFA"<BR>
<BR>
1on1 - Is the game a 1on1?<BR>
FFA - Is the game a FFA?<BR>
Random - usage: {Random&gt;='number between 0 and 100'} {Random&gt;=30} = has 70% chanse to not be displayed if used.<BR>
<BR>
OwnGold - usage: {OwnGold&gt;='amount of gold the computer must have'} {OwnGold&gt;=200} = must have 200 gold to be displayed.<BR>
other usage: {OwnGold&lt;400} = must have less than 400 gold to be displayed.<BR>
<BR>
OwnLumber - usage: {OwnLumber&gt;='amount of lumber the computer must have'} {OwnLumber&gt;=300} = must have 300 lumber to be displayed.<BR>
<BR>
Race - usage: {Race=HUMAN, ELF or UNDEAD ORC,} the message is only used by a computer if it's that race.<BR>
other usage: {Race!=HUMAN, ELF 
or UNDEAD ORC,} the message is only used by a computer if it's not that race.<BR>
<BR>
RaceChoiceRandom - usage: {!RaceChoiceRandom} This message will only display if the computer is not random race.<BR>
Other usage: {RaceChoiceRandom} This message will only be displayed if the computer is random race.<BR>
<BR>
More examples:<BR>
"{Race!=UNDEAD}[Race:C] is much better than undead will ever be."<BR>
"{FFA,Race=HUMAN}Human is so damn good at FFA, I will beat you all with ease."<BR>
"{Race!=ORC,1on1}Orcs are really bad now a days, especialy at 1on1."<BR>
<BR>
<BR>
<BR>
<B>Different word forms:</B><BR>
Now there is a new table file in every language, 'Translations.txt' is a file where every variable word is tranlated to the<BR>
current langauge but not only that, it also contain every word in the different forms that might be needed in the chat.<BR>
<BR>
Example:<BR>
"Im a orc, is there any other orcs in the game?"<BR>
<BR>
If this is done only using the variable [Race] the line will be:<BR>
"Im a orc, is there any other orc in the game?"<BR>
<BR>
The same error would occure for any race but the solution is in this table.<BR>
<BR>
the table contain translations like this:<BR>
ORC orc<BR>
ORC:S orcs<BR>
HUMAN human<BR>
HUMAN:S humans<BR>
and so on...<BR>
<BR>
Now the correct line to make it use "orcs" instead of "orc" at the second place in the chat string is formated like this:<BR>
"Im a [Race], is there any other [Race:S] in the game"<BR>
<BR>
As you probably understand now the variable [Race:S] will look up the current race name in the list with ":S" after and<BR>
use that word instead of the word at the race name alone. It don't need to be ":S" you can enter any identification you want<BR>
in the table as long as you refere to the same in the chat string.<BR>
<BR>
like having this in the table:<BR>
HUMAN human<BR>
HUMAN:S humans<BR>
HUMAN:ANYTHING the mighty humans<BR>
<BR>
"[Race] is a good race, don't you all [Race:S] agree that all [Race:S] should be called [Race:ANYTHING]?"<BR>
<BR>
Of course if you enter for example ORC:A and a translation in the table you have to enter<BR>
every race with :A and a translation since you never know what race the computer is playing when using your chat line.<BR>
<BR>
  </p>
</div>
</body>
</html>
